<?php

date_default_timezone_set('PRC');
 include('DelayQueue.php');


$dq = new DelayQueue('close_order', [
    'host' => '127.0.0.1',
    'port' => 6379,
    'auth' => '',
    'timeout' => 60,
]);
 //淘宝是一天之后过期
$dq->addTask('close_order_111', time() + 60*60*24, ['order_id' => '111']);
//$dq->addTask('close_order_222', time() + 60, ['order_id' => '222']);
//$dq->addTask('close_order_333', time() + 90, ['order_id' => '333']);